package com.zhanghu.backendZray.pojo.request.mail;

import com.zhanghu.backendZray.enums.NotifyTypeEnum;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author ZhangDong
 * @date 2024/8/28 21:02
 */
@Data
public class NotifySettingRequest {

    private Integer id;
    /**
     * 类型: 0 邮箱；1 Bark；2 短信
     * @see NotifyTypeEnum
     */
    @NotNull(message = "type cannot be null")
    private Byte type;
    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不符合要求")
    private String mail;
    /**
     * Bark url
     */
    @Size(max = 100, message = "长度超过限制，最大100")
    private String barkUrl;
}
